/*
https://leetcode.cn/problems/climbing-stairs/submissions/563087393/
动态规划
爬楼梯
*/

class Solution {
public:
    int climbStairs(int n) {
        int a=0,b=0,c=1;
        for(int i=1;i<=n;i++)
        {
            a=b;
            b=c;
            c=a+b;
        }
        return c;
    }
};